package com.logistics.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logistics.compont.Compont;
import com.logistics.mapper.StoreMapper;
import com.logistics.pojo.Store;
import com.logistics.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务实现层
 * @author Administrator
 *
 */
@Service
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements StoreService {

    @Autowired
    private StoreMapper storeMapper;

    @Override
    public List<Store> queryAllStores() {
        QueryWrapper<Store> wrapper = new QueryWrapper<Store>();
        wrapper.eq("state", Compont.STATE_UP);  //选择启用状态下的门店
        return storeMapper.selectList(wrapper);
    }
}
